#include <bits/stdc++.h>
using namespace std;
const int N = 500023;
bool vis[N];
vector<int> adj[N];
void solve() {
  long long int n, m;
  cin >> n >> m;
  long long int count = 0;
  pair<long long int, long long int> start = make_pair(1, 1);
  pair<long long int, long long int> end = make_pair(n, m);
  while (count < (n * m)) {
    if (count == (n * m)) break;
    cout << start.first << ' ' << start.second << '\n';
    count++;
    start.second++;
    if (start.second == (m + 1)) {
      start.first++;
      start.second = 1;
    }
    if (count == (n * m)) break;
    cout << end.first << ' ' << end.second << '\n';
    count++;
    end.second--;
    if (end.second == 0) {
      end.first--;
      end.second = m;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  int t = 0;
  while (t++ < T) {
    solve();
  }
}
